package com.qg.cyapp.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.Toast;

import com.qg.cyapp.R;
import com.qg.cyapp.component.Dolly;

public class CanDaoFuKuanActivity extends Activity {
	private EditText et;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_candao);
		et = (EditText) findViewById(R.id.et_cd_dizhi);
		OnClickListener o = new OnClickListener() {
			@Override
			public void onClick(View v) {
				if (R.id.bt_cd_queren == v.getId()) {
					if("".equals(et.getText().toString()) || null == et.getText().toString()) {
						Toast.makeText(CanDaoFuKuanActivity.this, "请输入地址", Toast.LENGTH_LONG).show();
						return;
					}
					Toast.makeText(CanDaoFuKuanActivity.this, "订餐成功", Toast.LENGTH_LONG).show();
//					Dolly.getDolly().destroyDolly();
					CanDaoFuKuanActivity.this.finish();
				} else {
					CanDaoFuKuanActivity.this.finish();
				}
			}
		};
		findViewById(R.id.bt_cd_queren).setOnClickListener(o);
		findViewById(R.id.bt_cd_quxiao).setOnClickListener(o);
	}
}
